<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item>薪资管理</el-breadcrumb-item>
      <el-breadcrumb-item>考勤打卡</el-breadcrumb-item>
    </el-breadcrumb>
    <el-button type="warning" round class="margintop20" @click="dakamorning">上班打卡</el-button>
    <el-button type="warning" round class="margintop20" @click="daka">下班打卡</el-button>
    <el-row>
      <el-col>
        <el-table
          :data="checksList.slice((page-1)*pageSize,pageSize*page)"
          style="width: 100%"
          class="tableinfo margintop20"
          :header-cell-style="{'text-align':'center'}"
          :cell-style="{'text-align':'center'}"
          stripe
        >
          <el-table-column label="序号" type="index"></el-table-column>
          <el-table-column label="姓名" prop="username"></el-table-column>
          <el-table-column label="电话号" prop="mobile"></el-table-column>
          <el-table-column label="上班
          打卡" prop="time">
            <template slot-scope="scope">{{scope.row.time | timeFormat('YY-MM-DD HH:mm')}}</template>
          </el-table-column>
          <el-table-column label="下班打卡" prop="time1">
            <template slot-scope="scope">{{scope.row.time1 | timeFormat('YY-MM-DD HH:mm')}}</template>
          </el-table-column>
          <el-table-column label="具体详情" prop="type"></el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { dakalist } from "@/api";

export default {
  data() {
    return {
      checksList: [],
      page: 1,
      pageSize: 6,
      dialogTableVisible: false,
      dialogFormVisible: false,
      form: {},
      rules: [],
    };
  },
  methods: {
    clockin() {},
    submitForm() {},
    resetForm() {},
    dakamorning() {
      this.$router.push({ name: "moneydaka" });
    },
    daka(){
      this.$router.push({ name: "moneydaka1" });
    }
  },
  mounted() {
    var mobile = localStorage.getItem("mobile");
    //   conso.log(mobile)
    dakalist({ mobile }).then((res) => {
      if (res.type) {
        console.log(res.result);
        this.checksList = res.result;
      }
    });
  },
};
</script>